package com.crm.customers.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.crm.base.dao.BaseDao;
import com.crm.customers.dao.CustomerClaimDao;
import com.crm.customers.model.CustomerClaim;
@Repository("customerClaimDao")
public class CustomerClaimDaoImpl  extends BaseDao  implements CustomerClaimDao {

	private  static final String MAPPER_NAMESAPCE = "CustomerClaimMapper.";
	@Override
	public List<CustomerClaim> getCustomerClaimList(CustomerClaim cc) {
		List<CustomerClaim> list = selectList(MAPPER_NAMESAPCE+"getCustomerClaimList", cc);
		if (list != null && list.size() > 0) {
			list.get(0).setTotalResults((Integer)selectOne(MAPPER_NAMESAPCE+"getCustomerClaimListCount", cc));
		}
		return list;
	}

	@Override
	public int updateCustomerClaim(CustomerClaim cc) {
		return update(MAPPER_NAMESAPCE+"updateCustomerClaim", cc);
	}

	@Override
	public int insertCustomerClaim(CustomerClaim cc) {
		return  insert(MAPPER_NAMESAPCE+"insertCustomerClaim", cc);
	}

	@Override
	public CustomerClaim getCustomerClaimInfo(CustomerClaim cc) {
		return selectOne(MAPPER_NAMESAPCE+"getCustomerClaimList", cc);
	}

}
